package com.bytedance.dao;

import com.bytedance.dataobject.B;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface BDAO {

    @InsertProvider(type = BProvider.class, method = "insertSQL")
    int addB(B b);

    @UpdateProvider(type = BProvider.class, method = "updateSQL")
    int updateB(B b);

    @SelectProvider(type = BProvider.class, method = "selectByIdSQL")
    B getBById(B b);

    @DeleteProvider(type = BProvider.class, method = "deleteByIdSQL")
    int deleteBById(String a, String c);

    @DeleteProvider(type = BProvider.class, method = "deleteByCSQL")
    int deleteBByC(String c);

    @InsertProvider(type = BProvider.class, method = "insertListSQL")
    int addBList(@Param(value = "bList") List<B> bList);

    @SelectProvider(type = BProvider.class, method = "selectAllSQL")
    List<B> getBList();

    @SelectProvider(type = BProvider.class, method = "selectCountSQL")
    int getCount(String column);
}
